<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Blog details</title>
    <!--google fonts-->
    <!--<link href="https://fonts.googleapis.com/css?family=PT+Serif|Open+Sans" rel="stylesheet">-->

    <!--font-awesome CDN-->
    <!--<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">-->
    <!--font-awesome-->
    <link href="styles/css/font-awesome.min.css" rel="stylesheet">

    <link rel="stylesheet" href="scss/utils/Main.css">
    <link rel="stylesheet" href="scss/utils/Client.css">

</head>
<body class="has-client-header has-client-nav has-client-footer">

<main role="main">
    <section class="section-blog-title">
        <div class="container">
            <div class="row">
                <div class="section-title col-xs-4">BLOG</div>
                <form action="" class="col-xs-4 col-xs-offset-4">
                    <div class="form-group">
                        <div class="input-group addon-right-transparent">
                            <input type="text" class="form-control">
                            <i class="fa fa-search input-group-addon font-rem-1-8"></i>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </section>
    <section>
        <div class="container">
            <div class="" role="contentinfo">
                <div class="thumbnail thumbnail-clean">
                    <img src="images/blog-big.png" alt="blog cover img">
                    <div class="article-caption">
                        <h3 class="title">HELLO NICE TO MEET YOU</h3>
                        <div class="author">
                            <span>JAMMIE LANDING </span>|<span> May 15, 2017</span>
                        </div>
                    </div>
                    <article>
                        <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injectedAt vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non
                        </p>

                        <p>
                            There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don’t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable.
                        </p>
                        <p>
                            Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintockContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock
                        </p>
                    </article>
                </div>
                <div class="share-post">
                    <div class="clearfix">
                        <span class="fl">SHARE POST</span>
                        <ul class="fr list-inline list-unstyled">
                            <li><a href="#" title="facebook"><i class="fa fa-facebook"></i></a></li>
                            <li><a href="#" title="twitter"><i class="fa fa-twitter"></i></a></li>
                            <li><a href="#" title="pinterest"><i class="fa fa-pinterest"></i></a></li>
                            <li><a href="#" title="google"><i class="fa fa-google-plus"></i></a></li>
                            <!--<li><a href="#" title="instagram"><i class="fa fa-instagram"></i></a></li>-->
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="section-blog-ad">
        <div class="container">
            <div class="row">
                <div class="col-xs-6 col-sm-3">
                    <div class="thumbnail thumbnail-clean thumbnail-sm">
                        <img src="images/blog-tg.png" alt="blog cover img">
                        <div class="caption">
                            <div class="thumbnail-author">
                                JAMMIE
                            </div>
                            <h3 class="thumbnail-title"><a href="#">HELLO NICE TO MEET YOU</a></h3>
                            <div class="thumbnail-date">
                                <span> May 15, 2017 at 7:35 pm</span>
                            </div>
                            <p class="thumbnail-content"><a href="#">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum ...</a></p>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-3">
                    <div class="thumbnail thumbnail-clean thumbnail-sm">
                        <img src="images/blog-tg.png" alt="blog cover img">
                        <div class="caption">
                            <div class="thumbnail-author">
                                JAMMIE
                            </div>
                            <h3 class="thumbnail-title"><a href="#">HELLO NICE TO MEET YOU</a></h3>
                            <div class="thumbnail-date">
                                <span> May 15, 2017 at 7:35 pm</span>
                            </div>
                            <p class="thumbnail-content"><a href="#">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum ...</a></p>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-3">
                    <div class="thumbnail thumbnail-clean thumbnail-sm">
                        <img src="images/blog-tg.png" alt="blog cover img">
                        <div class="caption">
                            <div class="thumbnail-author">
                                JAMMIE
                            </div>
                            <h3 class="thumbnail-title"><a href="#">HELLO NICE TO MEET YOU</a></h3>
                            <div class="thumbnail-date">
                                <span> May 15, 2017 at 7:35 pm</span>
                            </div>
                            <p class="thumbnail-content"><a href="#">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum ...</a></p>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-3">
                    <div class="thumbnail thumbnail-clean thumbnail-sm">
                        <img src="images/blog-tg.png" alt="blog cover img">
                        <div class="caption">
                            <div class="thumbnail-author">
                                JAMMIE
                            </div>
                            <h3 class="thumbnail-title"><a href="#">HELLO NICE TO MEET YOU</a></h3>
                            <div class="thumbnail-date">
                                <span> May 15, 2017 at 7:35 pm</span>
                            </div>
                            <p class="thumbnail-content"><a href="#">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum ...</a></p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="section-comment">
        <div class="container">
            <div class="section-title-short">ABOUT AUTHOR(3)</div>
            <ul class="sc-level-1 list-unstyled">
                <li>
                    <div class="list-content">
                        <div class="clearfix">
                            <h3 class="fl"><span class="sc-list-name">BEN.T</span><small>&nbsp;<span class="color-pink">|</span> august 24, 2014 at 7:35 pm</small> </h3>
                            <button type="button" class="btn btn-clean fr btn-commenting" title="Leave a message"><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
                        </div>
                        <p class="sc-list-content">Donec tempor adipiscing risus, sit amet consectetur tellus aliquam ac. Fusce dignissim at erat at lacinia. Sed malesuada, velit a tempus congue, turpis erat pellentesque lorem, non semper diam purus quis magna.</p>
                    </div>
                    <ul class="sc-level-2">
                        <li>
                            <div class="list-content">
                                <div class="clearfix">
                                    <h3 class="fl"><span class="sc-list-name">BEN.T</span><small>&nbsp;<span class="color-pink">|</span> august 24, 2014 at 7:35 pm</small> </h3>
                                    <button type="button" class="btn btn-clean fr btn-commenting" title="Leave a message"><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
                                </div>
                                <p class="sc-list-content">Donec tempor adipiscing risus, sit amet consectetur tellus aliquam ac. Fusce dignissim at erat at lacinia. Sed malesuada, velit a tempus congue, turpis erat pellentesque lorem, non semper diam purus quis magna.</p>
                            </div>
                            <ul>
                                <li>
                                    <div class="list-content">
                                        <div class="clearfix">
                                            <h3 class="fl"><span class="sc-list-name">BEN.T</span><small>&nbsp;<span class="color-pink">|</span> august 24, 2014 at 7:35 pm</small> </h3>
                                            <button type="button" class="btn btn-clean fr btn-commenting" title="Leave a message"><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
                                        </div>
                                        <p class="sc-list-content">Donec tempor adipiscing risus, sit amet consectetur tellus aliquam ac. Fusce dignissim at erat at lacinia. Sed malesuada, velit a tempus congue, turpis erat pellentesque lorem, non semper diam purus quis magna.</p>
                                    </div>
                                    <ul>
                                        <li>
                                            <div class="list-content">
                                                <div class="clearfix">
                                                    <h3 class="fl"><span class="sc-list-name">BEN.T</span><small>&nbsp;<span class="color-pink">|</span> august 24, 2014 at 7:35 pm</small> </h3>
                                                    <button type="button" class="btn btn-clean fr btn-commenting" title="Leave a message"><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
                                                </div>
                                                <p class="sc-list-content">Donec tempor adipiscing risus, sit amet consectetur tellus aliquam ac. Fusce dignissim at erat at lacinia. Sed malesuada, velit a tempus congue, turpis erat pellentesque lorem, non semper diam purus quis magna.</p>
                                            </div>
                                        </li>
                                    </ul>
                                </li>
                            </ul>

                        </li>
                        <li>
                            <div class="list-content">
                                <div class="clearfix">
                                    <h3 class="fl"><span class="sc-list-name">BEN.T</span><small>&nbsp;<span class="color-pink">|</span> august 24, 2014 at 7:35 pm</small> </h3>
                                    <button type="button" class="btn btn-clean fr btn-commenting" title="Leave a message"><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
                                </div>
                                <p class="sc-list-content">Donec tempor adipiscing risus, sit amet consectetur tellus aliquam ac. Fusce dignissim at erat at lacinia. Sed malesuada, velit a tempus congue, turpis erat pellentesque lorem, non semper diam purus quis magna.</p>
                            </div>

                        </li>
                    </ul>
                </li>
                <li>
                    <div class="list-content">
                        <div class="clearfix">
                            <h3 class="fl"><span class="sc-list-name">BEN.T</span> <small>&nbsp;<span class="color-pink">|</span> august 24, 2014 at 7:35 pm</small> </h3>
                            <button type="button" class="btn btn-clean fr btn-commenting" title="Leave a message"><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
                        </div>
                        <p class="sc-list-content">Donec tempor adipiscing risus, sit amet consectetur tellus aliquam ac. Fusce dignissim at erat at lacinia. Sed malesuada, velit a tempus congue, turpis erat pellentesque lorem, non semper diam purus quis magna.</p>
                    </div>
                </li>
            </ul>
        </div>
    </section>

    <section class="section-reply margin-footer">
        <div class="container">
            <div class="section-title-short">LEAVE A REPLY</div>
            <form action="">
                <fieldset class="row">
                    <div class="form-group col-xs-12">
                        <span class="sr-only">comment</span>
                        <textarea name="comment" class="form-control" rows="10" placeholder="Comment..."></textarea>
                    </div>
                    <div class="form-group col-xs-12 col-sm-6">
                        <span class="sr-only">name</span>
                        <input type="text" class="form-control" name="name" placeholder="Name">
                    </div>
                    <div class="form-group col-xs-12 col-sm-6">
                        <span class="sr-only">email</span>
                        <input type="email" class="form-control" placeholder="E-mail" name="email">
                    </div>

                    <div class="form-actions col-xs-12">
                        <button type="submit" class="btn btn-fill-default">POST COMMENT</button>
                    </div>
                </fieldset>
            </form>
        </div>
    </section>

</main>

<script src="lib/jquery.1.12.4.min.js"></script>
<script src="lib/bootstrap.min.js"></script>
<script src="lib/jquery.validate.min.js"></script>
<script src="scripts/reply.js"></script>
<script src="scripts/index.js"></script>
<script>
    // @sourceURL = test.js
    $(function($){
        $.get("template/client-bd-message.html",function(result) {
            var temp = result;
            function commentingFn() {
                new AfterSthByButton({
                    controlEl: this, temp: temp, callbackOnce: function () {
                        var id = ((new Date()).getTime()).toString();
                        var $list_form = $(this).parents(".list-content").next();
                        $list_form.attr("id", "l_" + id);
                        $list_form.find("form").attr("id", "c_" + id);
                        validatorFormEasy({
                            container: document.querySelector("#l_" + id),
                            rules: {
                                comment: {
                                    required: true
                                },
                                name: {
                                    required: true
                                },
                                email: {
                                    required: true,
                                    email: true
                                }
                            },
                            callback: function (params) {
                                console.log(params);

                                //reset
                                validator.resetForm();
                                $("#c_" + id)[0].reset();
                                $list_form.slideUp(160);

                                //new message
                                var message_html = createMessage({
                                    name: params.name,
                                    time: 'August 24, 2017 14:35 pm',
                                    content: params.comment
                                });
                                $list_form.after(message_html);
                                var $newCommenting = $list_form.next().find(".btn-commenting");
                                commentingFn.call($newCommenting);

                            }
                        });
                    }
                });
            }
            $(".btn-commenting").each(commentingFn);
        });
    })
</script>
</body>
</html>